const SERVICE = require("../../lib/js/service.js");

Page({
  data: {
  },
  onLoad(options) {
    if (options){
      wx.setNavigationBarTitle({
        title: options.title
      })
      this.setData({
        options: options
      });
    }

  },

  /*分享*/
  onShareAppMessage() { },

  /*页面卸载*/
  onUnload() {
    let td = this.data;
    if (td.options){
      let pages = getCurrentPages();
      let prevPage = pages[pages.length - 2]; //上一个页面
      prevPage.onShow(td.options);
      // wx.navigateBack();
    }
  },

  /*字体*/
  getTextarea(e) {
    let td = this.data;
    td.options.info = e.detail.value;
    this.setData({
      options: td.options
    });
  }
});
